<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView(array_merge($headerPlugins, ['template']));?>
</head>
<body class="view_form" id="view_form_Auction">

 <form id="view-form-form" class="view-form-form" method="post" action="<?php echo $this->createUrl([($model->id ? 'mobo/models-form/update' : 'mobo/models-form/create'), 'id'=>$model->id ? $model->id : null]);?>" enctype="multipart/form-data">
     <input type="hidden" id="modelid" name="modelid" value="<?php echo $modelid;?>">
            <table class="view-form-input" border="0" cellspacing="0" cellpadding="0" width="100%">
                <thead>
                <?php
				use common\widgets\CommonWidget;
				foreach($formFields as $v){
					$formtype = $v['formtype'];
					$c = ucfirst($formtype);
					//$action = "common\widgets\\$formtype\\$c";
				?>
                                        <tr>
                        <th valign="top" class="td-title"><label for="catid"><?php if($v['required']){?><font class="required">*</font><?php }?><?php echo $v['name'];?>：</label></th>
                        <td class="td-input">
						<?php
						

echo CommonWidget::widget(['viewPath'=>$formtype, 'options' => [
'id'=> $v['field'],
'name'=> 'Models['.$v['field'].']',
								'attributes'=> array_merge($model->attributes, array('id'=>$model->id)),
								'model'=> $model,
								'param'=> $v['param']

]]);
?>
						</td>
                    </tr>
                    
                <?php
				}
				?>
                      <tr>
                        <th></th>
                        <td><br>
                        <button class="ui-btn ui-btn-primary" type="submit">提交</button>
                            </td>
                    </tr>
                    
                        </tbody>
                    
            </table>
<?=$this->csrfToken()?>
 
    </form>
<?php //return $this->render('modelsform_validate', array('modelid' =>$modelid));?>
<?php $this->FooterView();?>
</body>
</html>


